package com.goldmantis.alitrip.common;

import com.goldmantis.alitrip.common.redis.RedisService;
import com.goldmantis.alitrip.common.shiro.JWTFilter;
import com.goldmantis.alitrip.pojo.UvSysUser;
import org.springframework.beans.factory.annotation.Autowired;

import javax.servlet.ServletRequest;

/**
 * @Author:Shmily
 * @Description:
 * @Date:Create in 16:08 2018/2/11
 */
public class UserThreadLocal {

    private static final ThreadLocal<UvSysUser> LOCAL=new ThreadLocal<UvSysUser>();

    private  UserThreadLocal(){

    }

    public static void setUser(UvSysUser user){
        LOCAL.set(user);
    }

    public static UvSysUser get(){
        return LOCAL.get();
    }

    public static void remove(){
        LOCAL.remove();
    }
}
